package com.pojo.req.dictType;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 系统字典类型表
 * </p>
 *
 * @author hewei
 * @since 2023-12-31
 */
@Data
public class DictTypeSaveReq {

    private Long id;

    /**
     * 数据类型编码
     */
    @NotBlank(message = "类型编码不能为空")
    @Length(min = 1,max = 128, message = "类型编码长度允许1-128位")
    private String dictTypeCode;

    /**
     * 数据类型名称
     */
    @NotBlank(message = "类型名称不能为空")
    @Length(min = 1,max = 128, message = "类型名称长度允许1-128位")
    private String dictTypeName;

    /**
     * 描述
     */
    @Length(max = 255, message = "类型描述长度最大允许255位")
    private String dictDesc;

    /**
     * 排序
     */
    @Min(value = 1, message = "排序必须大于等于1")
    @Max(value = 99999, message = "排序必须小于等于99999")
    private Integer sort;
}
